Day: <span>June 19, 2002</span>

Doc Searls, Sam Ruby, and Jonathan Peterson are all pointing at Dave Sifry’s Google API hack for Moveable Type.

Sifry writes: “Look down at the bottom of this blog entry. You’ll see a line that starts, ‘Related Stories:’ followed by 10 links. These links are created by a google search on the words in the title of this blog entry.”

It turns out that this is pretty easy to do in Radio as well. As a test, I created a macro called googleTitleSearch, which you can drop in your Macros folder. With the addition of a snippet of code to my item template, I now have the top 10 Google results for the title of my weblog posts.

If you want to try it out, here’s how:

Note: You must first create an account with Google, and configure Radio to use the key associated with your account. Follow steps 3 and 4a on this page to get your key.

If you want something simpler that doesn’t require signing up with Google, you might try out the googleIt macro.

1) Download googleTitleSearch.txt to your Macros folder. (It’s a sub-folder of your Radio UserLand program folder.)

2) Edit your item template, adding the following macro to the template, where you want the search results to appear:

<%local (adrpost = @weblogData.posts.["<%paddedItemNum%>"]); return (googleTitleSearch (adrpost))%>

(Be careful to make sure that the macro appears on a single line in your template. Line-breaks in the macro will cause an error on your page.)

3) Make sure that the preference for Item-level Title and Link is checked.

4) Create a new post, with a title. Click the Post button.

That’s it. For any posts that have a title, you’ll get a Google search result for the words in the title, along with your post.

Jake's Radio 'Blog Macros

Comments closed

Lee Braiden on kuro5hin.org: Artists, It’s Time to Choose a Side. “The days of huge corporations which do nothing but publish and distribute information in tediously slow and awkward ways are rapidly disappearing. No longer is it possible to claim that art and other forms of information have to cost a lot simply because of production and distribution economics. If middlemen still claim so, then they should be declared redundant ‘social thieves’, and swept aside.”

Jake's Radio 'Blog

Comments closed

Jeroen Frijters has a new Radio Weblog, where he’s documenting his implementation of a Java Virtual Machine in .NET.

Jake's Radio 'Blog

Comments closed